package org.example.ioc.demo;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@Data
@PropertySource(value = "classpath:teacher.properties")
@ConfigurationProperties(prefix = "teacher")
public class Teacher {
    private Integer id;
    private String name;
    private Integer age;
    private String[] loves;
    private Subject subject;
}
